CFLAGS=-g
CC=gcc

raid: raid.o main.o
	$(CC) -o raid raid.o main.o $(CFLAGS)

raid.o: raid.c
	$(CC) -c -o raid.o raid.c $(CFLAGS)

main.o: main.c
	$(CC) -c -o main.o main.c $(CFLAGS)

clean: 
	rm -f *.o
	rm raid

check: tests
	./tests
	rm tests

check.o: check.c
	$(CC) -c -o check.o check.c $(CFLAGS)

tests: check.o raid.o
	$(CC) $(CFLAGS) -o tests check.o raid.o
